package cz.zcu.fav.rat.managed.bean;

import java.util.List;

import javax.faces.bean.ManagedBean;

import javax.faces.bean.ViewScoped;

import cz.zcu.fav.rat.beans.Object;
import cz.zcu.fav.rat.dataaccess.service.ObjectService;

@ManagedBean(name = "objectsTableBean")
@ViewScoped
public class ObjectsTableBean extends AbstractTableBean<Object, ObjectService>
{
	private static final long serialVersionUID = 3866576871662551274L;

	@Override
	protected List<Object> getData()
	{
		return getDataProvider().getAll();
	}

	@Override
	protected void performDelete(List<Object> objects)
	{
		getDataProvider().deleteCollection(objects);
	}

	@Override
	protected ObjectService getService()
	{
		return SpringBeanFactory.getInstance().getBean("objectService",
				ObjectService.class);
	}
	
	
}
